import { StackNavigator, TabNavigator } from 'react-navigation';
import PopularPage from './pages/PopularPage';
import My from './pages/my/MyPage';
import CustomKeyPage from './pages/my/CustomKeyPage';
import SortKeyPage from './pages/my/SortKeyPage';
import RepositoryDetail from './pages/RepositoryDetail';
import FavoritePage from './pages/FavoritePage';
import TrendingPage from './pages/TrendingPage';


const MyTab = TabNavigator({
  PopularPage: {
    screen: PopularPage,
  },
  TrendingPage: {
    screen: TrendingPage,
  },
  Favorite: {
    screen: FavoritePage,
  },
  My: {
    screen: My,
  }
}, {
    tabBarPosition: 'bottom',
    animationEnabled: true,
    swipeEnabled: true,
    lazy: true,
    tabBarOptions: {
      activeTintColor: '#e91e63',
      showIcon: true,
      indicatorStyle: false,
    },
  })

const MyRouter = StackNavigator({
  Home: { screen: MyTab },
  CustomKeyPage: { screen: CustomKeyPage },
  SortKeyPage: { screen: SortKeyPage },
  RepositoryDetail: { screen: RepositoryDetail },
})

export default MyRouter;